home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1795 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  673 b 

  1. Path: unix.sri.com!usenet
  2. From: mklenk@updike.sri.com (Mark Klenk)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: renaming file names from within C!
  5. Date: 16 Jan 1996 23:52:38 GMT
  6. Organization: Nuance Communications
  7. Message-ID: <4dhdo6$8t1@unix.sri.com>
  8. References: <4dh7sb$6de@hammerhead.dadd.ti.com>
  9. Reply-To: mklenk@updike.sri.com
  10. NNTP-Posting-Host: 204.75.161.40
  11.  
  12.  
  13. Sudheer wrote:
  14. >
  15. >How can i move/rename a file in the UNIX system from within a C program.
  16.  
  17.     Use the ANSI C rename function.  It has the following prototype:
  18.  
  19.         int rename(char const * oldname, char const * newname);
  20.  
  21.     It returns 0 on success, non-zero otherwise.
  22.  
  23. ---
  24.  
  25. mklenk@coronacorp.com       (Mark Klenk)
  26.  
  27.  
  28.  
  29.